MATH 145 – Calculus I
September 4, 2025
Last time, we discussed some of the basic types of functions.
We also discussed compositions, one of the ways to combine simpler functions to make more complicated ones.
There are more ways to combine or change functions.
A piecewise function is a function that has different formulas on different intervals.
Example: The absolute value function \(f(x) = \vert x \vert\) returns \(x\) if \(x\) is positive, and \(-x\) if \(x\) is negative. We can write this as: \[ f(x) = \begin{cases} -x & \textrm{if } x < 0 \\ x & \textrm{if } x \ge 0 \\ \end{cases} \]
Example: \[ f(x) = \begin{cases} x + 3 & \textrm{if } x < 2 \\ x^2 & \textrm{if } 2 \le x \le 4 \\ 2x - 4 & \textrm{if } x > 4 \end{cases} \]
Evaluate \(f(1)\), \(f(2)\), \(f(3)\), \(f(4)\) and \(f(5)\).
Graph \(f(x)\).
Example: Determine the formula for the piecewise function shown below:
Example: Determine the formula for the piecewise function shown below:
You can perform algebraic operations on functions, just like you can perform algebraic operations on numbers.
Let \(f\) and \(g\) be functions that share the same domain. Then:
The sum of \(f\) and \(g\) is the function \(f + g\) defined by \((f + g)(x) = f(x) + g(x)\).
The difference of \(f\) and \(g\) is the function \(f - g\) defined by \((f - g)(x) = f(x) - g(x)\).
The product of \(f\) and \(g\) is the function \(f \cdot g\) defined by \((f \cdot g)(x) = f(x) \cdot g(x)\).
The quotient of \(f\) and \(g\) is the function \(\frac{f}{g}\) defined by \((\frac{f}{g})(x) = \frac{f(x)}{g(x)}\) for all \(x\) such that \(g(x) \ne 0\).
Let \(f\) and \(g\) be functions that share the same domain. Then:
The sum of \(f\) and \(g\) is the function \(f + g\) defined by \((f + g)(x) = f(x) + g(x)\).
The difference of \(f\) and \(g\) is the function \(f - g\) defined by \((f - g)(x) = f(x) - g(x)\).
The product of \(f\) and \(g\) is the function \(f \cdot g\) defined by \((f \cdot g)(x) = f(x) \cdot g(x)\).
The quotient of \(f\) and \(g\) is the function \(\frac{f}{g}\) defined by \((\frac{f}{g})(x) = \frac{f(x)}{g(x)}\) for all \(x\) such that \(g(x) \ne 0\).
This is mainly about notation, but this notation will allow us to simplify functions for calculus formulas. If you can notice when a function is a combination of two simpler ones, it may help make future things easier.
Example: Let \(f(x) = 2x + 3\), \(g(x) = x^3\) and \(h(x) = \sin(x)\). (Assume all functions share the domain of \(\mathbb{R}\).)
Find:
\((f + g)(x)\).
\((h - f)(x)\).
\((g \cdot f)(2)\).
\(\left( \frac{f}{g} \right)(5)\). Where is this undefined?
\(\left( \frac{f}{h} \right)(x)\). Where is this undefined?
\((h \cdot (g - f))(x)\).
Suppose we have the function \(f(x) = x^2\). If I want to move the whole graph 3 units upwards (i.e. in the positive \(y\)-direction), how could I do it?
We want to send \((x,\, y)\) to \((x,\, y+3).\)
Given a function \(y = f(x)\) and a real number \(a\), the transformed function \(y = g(x) = f(x) + a\) is a vertical translation on the graph of \(f\). That is, every point \((x, f(x))\) on the graph of \(f\) gets shifted vertically to the corresponding point \((x, f(x) + a)\) on the graph of \(h\).
Suppose we have the function \(f(x) = x^2\). Now if I want to move the whole graph 3 units to the right (i.e. in the positive \(x\)-direction), how could I do it?
We want to send \((x,\, y)\) to \((x+3,\, y).\)
Given a function \(y = f(x)\) and a real number \(b\), the transformed function \(y = h(x) = f(x + b)\) is a horizontal translation on the graph of \(f\). That is, every point \((x, f(x))\) on the graph of \(f\) gets shifted horizonally to the corresponding point \((x + b, f(x))\) on the graph of \(h\).
Example: On the same axes as the plot of \(r\), sketch the following graphs. Be sure to label the point on each of \(f\), \(g\) and \(h\) that corresponds to \((-2,\,-1)\) on the original graph of \(r\).
\(y = f(x) = r(x) + 2\)
\(y = g(x) = r(x + 1)\)
\(y = h(x) = r(x + 1) + 2\)
Example: On the same axes as the plot of \(s\), sketch the following graphs. Be sure to label the point on each of \(j\), \(k\) and \(\ell\) that corresponds to \((-2,\,-3)\) on the original graph of \(s\).
\(y = j(x) = s(x) - 1\)
\(y = k(x) = s(x - 2)\)
\(y = \ell(x) = s(x - 2) - 1\).
Given a function \(y = f(x)\) and a real number \(c > 0\), the transformed function \(y = v(x) = cf(x)\) is a vertical stretch of the graph of \(f\). Every point \((x, f(x))\) on the graph of \(f\) gets stretch vertically to the corresponding point \((x, cf(x))\) on the graph of \(v\). If \(0 < c < 1\), the graph of \(v\) is a compression of \(f\) toward the \(x\)-axis; if \(c > 1\), the graph of \(v\) is a stretch of \(f\) away from the \(x\)-axis. Points where \(f(x) = 0\) are unchanged by the transformation.
Given a function \(y = f(x)\) and a real number \(c < 0\), the transformed function \(y = v(x) = cf(x)\) is a reflection of the graph of \(f\) across the \(x\)-axis followed by a vertical stretch by a factor of \(\vert c \vert\).
Example: On the same axes as the plot of \(r\), sketch the following graphs. Be sure to label the point on each of \(f\), \(g\) and \(h\) that corresponds to \((-2,\,-1)\) on the original graph of \(r\).
\(y = f(x) = 3r(x)\)
\(y = g(x) = \frac{1}{3}r(x)\)
Example: On the same axes as the plot of \(s\), sketch the following graphs. Be sure to label the point on each of \(j\), \(k\) and \(\ell\) that corresponds to \((-2,\,-3)\) on the original graph of \(s\).
\(y = j(x) = -2s(x)\)
\(y = k(x) = -\frac{1}{2}s(x)\)
Given a function \(y = f(x)\) and a real number \(c > 0\), the transformed function \(y = h(x) = f(cx)\) is a horizontal stretch of the graph of \(f\). Every point \((x, f(x))\) on the graph of \(f\) gets stretch vertically to the corresponding point \((x, f(cx))\) on the graph of \(h\). If \(0 < c < 1\), the graph of \(v\) is a compression of \(f\) toward the \(y\)-axis; if \(c > 1\), the graph of \(h\) is a stretch of \(f\) away from the \(y\)-axis. Points where \(x = 0\) are unchanged by the transformation.
Given a function \(y = f(x)\) and a real number \(c < 0\), the transformed function \(y = h(x) = f(cx)\) is a reflection of the graph of \(f\) across the \(y\)-axis followed by a horizontal stretch by a factor of \(\vert c \vert\).
Example: On the same axes as the plot of \(r\), sketch the following graphs. Be sure to label the point on each of \(f\), \(g\) and \(h\) that corresponds to \((-2,\,-1)\) on the original graph of \(r\).
\(y = f(x) = r(3x)\)
\(y = g(x) = r(\frac{1}{3}x)\)
Example: On the same axes as the plot of \(s\), sketch the following graphs. Be sure to label the point on each of \(j\), \(k\) and \(\ell\) that corresponds to \((-2,\,-3)\) on the original graph of \(s\).
\(y = j(x) = s(-2x)\)
\(y = k(x) = s(-\frac{1}{2}x)\)
Example: Above is the graph of \(y = f(x) = x^2\). What does the transformation \(y = g(x) = 2 f\left(\frac{1}{2}x + 3\right) - 4\) do to the graph of \(f\)?